package com.wuba.rxjavademo.tzx.filter;

import com.wuba.rxjavademo.tzx.common.Base;

import rx.Observable;

/**
 * Created by tanzhenxing
 * Date: 2016/6/24.
 * Description:
 * filter:进行数据过滤。filter(Func1<? super T, Boolean> predicate)
 */
public class RxFilter extends Base {
    public static void main(String[] args) {
        RxFilter filter = new RxFilter();
        filter.run();
    }

    @Override
    public void run() {
        Observable.just("AAA","AAb","c")
                .filter(str -> str.contains("A"))
                .subscribe(Base::print);
    }
}
